package Merlion.util.state;

import Merlion.MRP.entity.UnplannedDailyDemandEntity;
import Merlion.MRP.entity.WeeklyMaterialRequirementEntity;
import java.util.Date;

public class MaterialRequirementState {

    // Common Attributes
    private Integer yearInt;
    private Integer monthInt;
    private Integer weekOfMonth;
    private Long materialId;
    private String materialName;
    private String remarks;
    private String status;
    private Date requestedOn;
    private boolean purchased;
    
    // Individual Material Requirement Attributes
    private String IndividualMaterialRequirementId;
    private int requiredAmount;
    private String unit;
    private Date availableBy;
    private int leadTime; // in weeks
    
    // Weekly Product Material Requirement Atrributes
    private String weeklyProductMaterialRequirementId;
    private Long billOfMaterialsId;
    private Long productId;
    private String productName;
    private String plannedWeeklyDemandId; // planned weekly demand per product
    private double bomMultiplier; // BOM Multiplier = weeklyDemand * weight / bomBatchSize
    private double adjustedMultiplier;
    private boolean raised;
    
    // Unplanned Material Requirement Additional Attributes
    private Long unplannedMaterialRequirementId;
    private UnplannedDailyDemandEntity unplannedDailyDemand;
    private WeeklyMaterialRequirementEntity weeklyMaterialRequirement;
    private boolean withdrawn;

    public MaterialRequirementState() {
    }

    public void createIndividualMaterialRequirementState(Integer yearInt, Integer monthInt, Integer weekOfMonth, Long materialId, String materialName, String remarks, String status, Date requestedOn, boolean purchased, String IndividualMaterialRequirementId, int requiredAmount, String unit, Date availableBy, int leadTime) {
        this.yearInt = yearInt;
        this.monthInt = monthInt;
        this.weekOfMonth = weekOfMonth;
        this.materialId = materialId;
        this.materialName = materialName;
        this.remarks = remarks;
        this.status = status;
        this.requestedOn = requestedOn;
        this.purchased = purchased;
        this.IndividualMaterialRequirementId = IndividualMaterialRequirementId;
        this.requiredAmount = requiredAmount;
        this.unit = unit;
        this.availableBy = availableBy;
        this.leadTime = leadTime;
    }

    public void createWeeklyMaterialRequirementState(Integer yearInt, Integer monthInt, Integer weekOfMonth, Long materialId, String materialName, String remarks, String status, Date requestedOn, boolean purchased, String weeklyProductMaterialRequirementId, Long billOfMaterialsId, Long productId, String productName, String plannedWeeklyDemandId, double bomMultiplier, double adjustedMultiplier, boolean raised) {
        this.yearInt = yearInt;
        this.monthInt = monthInt;
        this.weekOfMonth = weekOfMonth;
        this.materialId = materialId;
        this.materialName = materialName;
        this.remarks = remarks;
        this.status = status;
        this.requestedOn = requestedOn;
        this.purchased = purchased;
        this.weeklyProductMaterialRequirementId = weeklyProductMaterialRequirementId;
        this.billOfMaterialsId = billOfMaterialsId;
        this.productId = productId;
        this.productName = productName;
        this.plannedWeeklyDemandId = plannedWeeklyDemandId;
        this.bomMultiplier = bomMultiplier;
        this.adjustedMultiplier = adjustedMultiplier;
        this.raised = raised;
    }

    public void createUnplannedMaterialRequirementState(Integer yearInt, Integer monthInt, Integer weekOfMonth, Long materialId, String materialName, String remarks, String status, Date requestedOn, boolean purchased, String weeklyProductMaterialRequirementId, Long productId, String productName, double bomMultiplier, Long unplannedMaterialRequirementId, UnplannedDailyDemandEntity unplannedDailyDemand, WeeklyMaterialRequirementEntity weeklyMaterialRequirement, boolean withdrawn) {
        this.yearInt = yearInt;
        this.monthInt = monthInt;
        this.weekOfMonth = weekOfMonth;
        this.materialId = materialId;
        this.materialName = materialName;
        this.remarks = remarks;
        this.status = status;
        this.requestedOn = requestedOn;
        this.purchased = purchased;
        this.weeklyProductMaterialRequirementId = weeklyProductMaterialRequirementId;
        this.productId = productId;
        this.productName = productName;
        this.bomMultiplier = bomMultiplier;
        this.unplannedMaterialRequirementId = unplannedMaterialRequirementId;
        this.unplannedDailyDemand = unplannedDailyDemand;
        this.weeklyMaterialRequirement = weeklyMaterialRequirement;
        this.withdrawn = withdrawn;
    }

    public String getIndividualMaterialRequirementId() {
        return IndividualMaterialRequirementId;
    }

    public void setIndividualMaterialRequirementId(String IndividualMaterialRequirementId) {
        this.IndividualMaterialRequirementId = IndividualMaterialRequirementId;
    }

    public double getAdjustedMultiplier() {
        return adjustedMultiplier;
    }

    public void setAdjustedMultiplier(double adjustedMultiplier) {
        this.adjustedMultiplier = adjustedMultiplier;
    }

    public Date getAvailableBy() {
        return availableBy;
    }

    public void setAvailableBy(Date availableBy) {
        this.availableBy = availableBy;
    }

    public Long getBillOfMaterialsId() {
        return billOfMaterialsId;
    }

    public void setBillOfMaterialsId(Long billOfMaterialsId) {
        this.billOfMaterialsId = billOfMaterialsId;
    }

    public double getBomMultiplier() {
        return bomMultiplier;
    }

    public void setBomMultiplier(double bomMultiplier) {
        this.bomMultiplier = bomMultiplier;
    }

    public int getLeadTime() {
        return leadTime;
    }

    public void setLeadTime(int leadTime) {
        this.leadTime = leadTime;
    }

    public Long getMaterialId() {
        return materialId;
    }

    public void setMaterialId(Long materialId) {
        this.materialId = materialId;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public Integer getMonthInt() {
        return monthInt;
    }

    public void setMonthInt(Integer monthInt) {
        this.monthInt = monthInt;
    }

    public String getPlannedWeeklyDemandId() {
        return plannedWeeklyDemandId;
    }

    public void setPlannedWeeklyDemandId(String plannedWeeklyDemandId) {
        this.plannedWeeklyDemandId = plannedWeeklyDemandId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public boolean isPurchased() {
        return purchased;
    }

    public void setPurchased(boolean purchased) {
        this.purchased = purchased;
    }

    public boolean isRaised() {
        return raised;
    }

    public void setRaised(boolean raised) {
        this.raised = raised;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Date getRequestedOn() {
        return requestedOn;
    }

    public void setRequestedOn(Date requestedOn) {
        this.requestedOn = requestedOn;
    }

    public int getRequiredAmount() {
        return requiredAmount;
    }

    public void setRequiredAmount(int requiredAmount) {
        this.requiredAmount = requiredAmount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public UnplannedDailyDemandEntity getUnplannedDailyDemand() {
        return unplannedDailyDemand;
    }

    public void setUnplannedDailyDemand(UnplannedDailyDemandEntity unplannedDailyDemand) {
        this.unplannedDailyDemand = unplannedDailyDemand;
    }

    public Long getUnplannedMaterialRequirementId() {
        return unplannedMaterialRequirementId;
    }

    public void setUnplannedMaterialRequirementId(Long unplannedMaterialRequirementId) {
        this.unplannedMaterialRequirementId = unplannedMaterialRequirementId;
    }

    public Integer getWeekOfMonth() {
        return weekOfMonth;
    }

    public void setWeekOfMonth(Integer weekOfMonth) {
        this.weekOfMonth = weekOfMonth;
    }

    public WeeklyMaterialRequirementEntity getWeeklyMaterialRequirement() {
        return weeklyMaterialRequirement;
    }

    public void setWeeklyMaterialRequirement(WeeklyMaterialRequirementEntity weeklyMaterialRequirement) {
        this.weeklyMaterialRequirement = weeklyMaterialRequirement;
    }

    public String getWeeklyProductMaterialRequirementId() {
        return weeklyProductMaterialRequirementId;
    }

    public void setWeeklyProductMaterialRequirementId(String weeklyProductMaterialRequirementId) {
        this.weeklyProductMaterialRequirementId = weeklyProductMaterialRequirementId;
    }

    public boolean isWithdrawn() {
        return withdrawn;
    }

    public void setWithdrawn(boolean withdrawn) {
        this.withdrawn = withdrawn;
    }

    public Integer getYearInt() {
        return yearInt;
    }

    public void setYearInt(Integer yearInt) {
        this.yearInt = yearInt;
    }
}
